package com.eveinfo.api.asset;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

import com.eveinfo.display.asset.AssetComparable;
import com.eveinfo.sql.data.Item;

public class ApiAsset implements Serializable, AssetComparable{

	private static final long serialVersionUID = 4803602926883834561L;

	private ArrayList<ApiAsset> assets = new ArrayList<ApiAsset>();

	private int itemID;
	private int locationID;
	private int typeID;
	private int quantity;
	private int flag;
	private int singleton;
	private ApiAsset parent;
	private Item item;
	private boolean containItems;
	
	public ApiAsset() {
		this.containItems = false;
		this.parent = null;
	}

	public ArrayList<ApiAsset> getAssets() {
		return assets;
	}

	public void addAsset(Collection<ApiAsset> assets) {
		this.assets.addAll(assets);
	}

	public int getItemID() {
		return itemID;
	}

	public void setItemID(int itemID) {
		this.itemID = itemID;
	}

	public int getLocationID() {
		return locationID;
	}

	public void setLocationID(int locationID) {
		this.locationID = locationID;
	}

	public int getTypeID() {
		return typeID;
	}

	public void setTypeID(int typeID) {
		this.typeID = typeID;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public int getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

	public int getSingleton() {
		return singleton;
	}

	public void setSingleton(int singleton) {
		this.singleton = singleton;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Item getItem() {
		return item;
	}

	public void setContainItems(boolean containItems) {
		this.containItems = containItems;
	}

	public boolean isContainItems() {
		return containItems;
	}

	public void setParent(ApiAsset parent) {
		this.parent = parent;
	}

	public ApiAsset getParent() {
		return parent;
	}

	@Override
	public int getGroupID() {
		return item.getGroupID();
	}

	@Override
	public String getTypeName() {
		return item.getTypeName();
	}
	
}
